package com.hl.service;

import com.hl.mapper.UserMapper;
import com.hl.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;
    @Override
    public int add(Users user) {
        return userMapper.add(user);
    }

    @Override
    public List<Users> findAll(String keyword) {
        return userMapper.selectAll(keyword);
    }

    @Override
    public int updateUser(String userName, String userAccount,String password, String phoneNumber,String location, Integer points, Integer userId) {
        return userMapper.updateUser(userName, userAccount, password, phoneNumber, location, points, userId);
    }

    @Override
    public int deleteUser(Integer userId) {
        return userMapper.deleteUser(userId);
    }


}
